perm filename TEST.PAS[TEX,DEK]1 blob sn#424397 filedate 1979-03-10 generic text, type C, neo UTF8
COMMENT āŠ—   VALID 00002 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	(* program 9.1 -- frequency count of letters in input file *)
C00004 ENDMK
CāŠ—;
(* program 9.1 -- frequency count of letters in input file *)

program fcount(input,output);

var ch: char;
count: array['a'..'z'] of integer;
letter: set of 'a'..'z';
begin letter := ['a'..'z'];
for ch := 'a' to 'z' do count[ch] := 0;
while not eof do
begin
while not eoln do
begin read(ch); write(ch);
if ch in letter then count[ch] := count[ch]+1
end;
writeln;
readln
end
end.

type alfa = packed array[1..10] of char;
status = (married,widowed,divorced,single);
date=record mo:(jan,feb,mar,apr,may,jun,
july,aug,sept,oct,nov,dec);
day:1..31;
year:integer
end;
person=record
ss:integer;
name: record first,last: alfa
end;
sex:(male,female);
birth:date;
depdts:integer;
case ms:states of
married,widowed:(mdate:date);
divorced: (ddate:date;
first:Boolean);
single:(indepdt: Boolean)
end; (*person*)

with p,name,birth do
begin last := 'woodyard  ';
first := 'edward    ';
ss := 845680539;
sex := male;
mo := aug;
day := 30;
year := 1941;
depdts := 1;
ms := single;
indepdt := true
end (*with*)